
import '../../entity/setting_entity.dart';
import 'base/json_convert_content.dart';

SettingEntity $SettingEntityFromJson(Map<String, dynamic> json) {
	final SettingEntity settingEntity = SettingEntity();
	final String? apiAddr = jsonConvert.convert<String>(json['api_addr']);
	if (apiAddr != null) {
		settingEntity.apiAddr = apiAddr;
	}
	final String? picApiAddr = jsonConvert.convert<String>(json['picApiAddr']);
	if (picApiAddr != null) {
		settingEntity.picApiAddr = picApiAddr;
	}
	final String? faceApiAddr = jsonConvert.convert<String>(json['faceApiAddr']);
	if (faceApiAddr != null) {
		settingEntity.faceApiAddr = faceApiAddr;
	}
	final String? psw = jsonConvert.convert<String>(json['psw']);
	if (psw != null) {
		settingEntity.psw = psw;
	}
	final String? appKey = jsonConvert.convert<String>(json['appKey']);
	if (appKey != null) {
		settingEntity.appKey = appKey;
	}
	final String? hfPort = jsonConvert.convert<String>(json['hfPort']);
	if (hfPort != null) {
		settingEntity.hfPort = hfPort;
	}
	final String? idPort = jsonConvert.convert<String>(json['idPort']);
	if (idPort != null) {
		settingEntity.idPort = idPort;
	}
	final String? commonUid = jsonConvert.convert<String>(json['commonUid']);
	if (commonUid != null) {
		settingEntity.commonUid = commonUid;
	}

	final String? auth = jsonConvert.convert<String>(json['auth']);
	if (auth != null) {
		settingEntity.auth = auth;
	}
	// final String? deviceName = jsonConvert.convert<String>(json['device_name']);
	// if (deviceName != null) {
	// 	settingEntity.deviceName = deviceName;
	// }
	// final String? publishName = jsonConvert.convert<String>(json['publish_name']);
	// if (publishName != null) {
	// 	settingEntity.publishName = publishName;
	// }
	final String? deviceNo = jsonConvert.convert<String>(json['device_no']);
	if (deviceNo != null) {
		settingEntity.deviceNo = deviceNo;
	}
	final int? scanTime = jsonConvert.convert<int>(json['scanTime']);
	if (scanTime != null) {
		settingEntity.scanTime = scanTime;
	}
	final int? normalCountdown = jsonConvert.convert<int>(json['normal_countdown']);
	if (normalCountdown != null) {
		settingEntity.normalCountdown = normalCountdown;
	}
	final int? fastCountdown = jsonConvert.convert<int>(json['fast_countdown']);
	if (fastCountdown != null) {
		settingEntity.fastCountdown = fastCountdown;
	}
	final int? slowCountdown = jsonConvert.convert<int>(json['slow_countdown']);
	if (slowCountdown != null) {
		settingEntity.slowCountdown = slowCountdown;
	}
	final int? blockStart = jsonConvert.convert<int>(json['blockStart']);
	if (blockStart != null) {
		settingEntity.blockStart = blockStart;
	}
	final int? blockCount = jsonConvert.convert<int>(json['blockCount']);
	if (blockCount != null) {
		settingEntity.blockCount = blockCount;
	}
	final bool? isUltra = jsonConvert.convert<bool>(json['isUltra']);
	if (isUltra != null) {
		settingEntity.isUltra = isUltra;
	}
	return settingEntity;
}

Map<String, dynamic> $SettingEntityToJson(SettingEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['api_addr'] = entity.apiAddr;
	data['picApiAddr'] = entity.picApiAddr;
	data['faceApiAddr'] = entity.faceApiAddr;
	data['psw'] = entity.psw;
	data['appKey'] = entity.appKey;
	data['commonUid'] = entity.commonUid;
	data['blockStart'] = entity.blockStart;
	data['blockCount'] = entity.blockCount;
	data['auth'] = entity.auth;
	// data['device_name'] = entity.deviceName;
	data['device_no'] = entity.deviceNo;
	data['normal_countdown'] = entity.normalCountdown;
	data['scanTime'] = entity.scanTime;
	data['isUltra'] = entity.isUltra;
	data['fast_countdown'] = entity.fastCountdown;
	data['slow_countdown'] = entity.slowCountdown;
	data['hfPort'] = entity.hfPort;
	data['idPort'] = entity.idPort;
	// data['publish_name'] = entity.publishName;
	return data;
}
